import React, { Component } from 'react'
import PureRenderMixin from 'react-addons-pure-render-mixin'

import HomeListItem from './HomeListItem'

import './style.less'

class HomeList extends Component {
  constructor(props) {
    super(props);
    this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);
  }

  render() {
    const data = this.props.data;
    return (
      <div className="list-container">
        {data.map((item, index) => {
          return <HomeListItem key={index} item={item} />
        })}
      </div>
    )
  }
}

export default HomeList
